<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.line.js" ></script>
    <script src="../libraries/RGraph.drawing.image.js" ></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A basic example of the drawing API rect object</title>
    
    <meta name="description" content="A basic example of the drawing API rect object" />
    

    <style>
        .RGraph_tooltip {
            opacity: 0.8 ! important;
        }
    </style>
</head>
<body>
        
    <h1>A basic example of the drawing API image object</h1>

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>

    <script>
        window.onload = function (e)
        {
            var line = new RGraph.Line('cvs', [5,4,8,4,3,5,2])
                .Set('hmargin', 5)
                .Set('labels', ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'])
                .Set('background.grid.vlines', false)
                .Set('background.grid.border', false)
                .Set('tickmarks', 'circle')
                .Draw();
            
            var coords = line.coords[2];
            
            var img = new RGraph.Drawing.Image('cvs', coords[0], coords[1], '/images/logo.png')
                .Set('halign', 'center')
                .Set('valign', 'center')
                .Set('alpha', 0.6)
                .Set('tooltips', ['<b>The tooltip!</b><br /><i>Remember that tooltips can contain all manner of HTML (they\'re just DIV tags)</i>'])
                .Set('tooltips', ['The tooltip!'])
                .Draw();
        }
    </script>


    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>